<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>eRPC API Reference: erpc::MUTransport Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="customdoxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="nxp_logo_small.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">eRPC API Reference
   &#160;<span id="projectnumber">Rev. 1.7.4</span>
   </div>
   <div id="projectbrief">NXP Semiconductors</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="modules.html"><span>API&#160;Reference</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="inherits.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('classerpc_1_1_m_u_transport.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a> &#124;
<a href="#pro-methods">Protected Member Functions</a> &#124;
<a href="#pro-attribs">Protected Attributes</a> &#124;
<a href="classerpc_1_1_m_u_transport-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">erpc::MUTransport Class Reference<div class="ingroups"><a class="el" href="group__transports.html">Transport Layers</a> &raquo; <a class="el" href="group__mu__transport.html">Messaging Unit</a></div></div>  </div>
</div><!--header-->
<div class="contents">

<p><a class="el" href="classerpc_1_1_transport.html" title="Abstract interface for transport layer. ">Transport</a> that uses Messaging Unit (MU) for interprocessor messaging.  
 <a href="classerpc_1_1_m_u_transport.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="erpc__mu__transport_8h_source.html">erpc_mu_transport.h</a>&gt;</code></p>
<div id="dynsection-0" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-0-trigger" src="closed.png" alt="+"/> Inheritance diagram for erpc::MUTransport:</div>
<div id="dynsection-0-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-0-content" class="dyncontent" style="display:none;">
<div class="center"><iframe scrolling="no" frameborder="0" src="classerpc_1_1_m_u_transport__inherit__graph.svg" width="140" height="112"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
</div>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>
<div id="dynsection-1" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-1-trigger" src="closed.png" alt="+"/> Collaboration diagram for erpc::MUTransport:</div>
<div id="dynsection-1-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-1-content" class="dyncontent" style="display:none;">
<div class="center"><iframe scrolling="no" frameborder="0" src="classerpc_1_1_m_u_transport__coll__graph.svg" width="406" height="142"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
</div>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a27300b08ba409b3d249055f80544ac13"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classerpc_1_1_m_u_transport.html#a27300b08ba409b3d249055f80544ac13">MUTransport</a> (void)</td></tr>
<tr class="memdesc:a27300b08ba409b3d249055f80544ac13"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor of MU transport.  <a href="#a27300b08ba409b3d249055f80544ac13">More...</a><br /></td></tr>
<tr class="separator:a27300b08ba409b3d249055f80544ac13"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa6b15a8fbb08393fff58a74cd9020b6c"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa6b15a8fbb08393fff58a74cd9020b6c"></a>
virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classerpc_1_1_m_u_transport.html#aa6b15a8fbb08393fff58a74cd9020b6c">~MUTransport</a> (void)</td></tr>
<tr class="memdesc:aa6b15a8fbb08393fff58a74cd9020b6c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destructor of MU transport. <br /></td></tr>
<tr class="separator:aa6b15a8fbb08393fff58a74cd9020b6c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4b7901579d91960ed7f1857b1d1c3f59"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="group__infra.html#ga5f8872e58f09a16d192bf664f9898651">erpc_status_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classerpc_1_1_m_u_transport.html#a4b7901579d91960ed7f1857b1d1c3f59">init</a> (MU_Type *muBase)</td></tr>
<tr class="memdesc:a4b7901579d91960ed7f1857b1d1c3f59"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialization of MU transport layer.  <a href="#a4b7901579d91960ed7f1857b1d1c3f59">More...</a><br /></td></tr>
<tr class="separator:a4b7901579d91960ed7f1857b1d1c3f59"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a781435aad523645be3034460ac8631dc"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="group__infra.html#ga5f8872e58f09a16d192bf664f9898651">erpc_status_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classerpc_1_1_m_u_transport.html#a781435aad523645be3034460ac8631dc">receive</a> (<a class="el" href="classerpc_1_1_message_buffer.html">MessageBuffer</a> *message)</td></tr>
<tr class="memdesc:a781435aad523645be3034460ac8631dc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Start receiving data and stores it to passed message buffer.  <a href="#a781435aad523645be3034460ac8631dc">More...</a><br /></td></tr>
<tr class="separator:a781435aad523645be3034460ac8631dc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1d91622c7c8b8161aaf8dec891ff298a"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="group__infra.html#ga5f8872e58f09a16d192bf664f9898651">erpc_status_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classerpc_1_1_m_u_transport.html#a1d91622c7c8b8161aaf8dec891ff298a">send</a> (<a class="el" href="classerpc_1_1_message_buffer.html">MessageBuffer</a> *message)</td></tr>
<tr class="memdesc:a1d91622c7c8b8161aaf8dec891ff298a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Function to send prepared message.  <a href="#a1d91622c7c8b8161aaf8dec891ff298a">More...</a><br /></td></tr>
<tr class="separator:a1d91622c7c8b8161aaf8dec891ff298a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aed8229c0d1252932cbc2825240ca718a"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classerpc_1_1_m_u_transport.html#aed8229c0d1252932cbc2825240ca718a">hasMessage</a> ()</td></tr>
<tr class="memdesc:aed8229c0d1252932cbc2825240ca718a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Function to check if is new message to receive.  <a href="#aed8229c0d1252932cbc2825240ca718a">More...</a><br /></td></tr>
<tr class="separator:aed8229c0d1252932cbc2825240ca718a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_classerpc_1_1_transport"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classerpc_1_1_transport')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="classerpc_1_1_transport.html">erpc::Transport</a></td></tr>
<tr class="memitem:af0b6b9c50d238f99de90ccd8b6050c91 inherit pub_methods_classerpc_1_1_transport"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af0b6b9c50d238f99de90ccd8b6050c91"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classerpc_1_1_transport.html#af0b6b9c50d238f99de90ccd8b6050c91">Transport</a> (void)</td></tr>
<tr class="memdesc:af0b6b9c50d238f99de90ccd8b6050c91 inherit pub_methods_classerpc_1_1_transport"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor. <br /></td></tr>
<tr class="separator:af0b6b9c50d238f99de90ccd8b6050c91 inherit pub_methods_classerpc_1_1_transport"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0cb1c4441873bce62f2ef455a6136888 inherit pub_methods_classerpc_1_1_transport"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a0cb1c4441873bce62f2ef455a6136888"></a>
virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classerpc_1_1_transport.html#a0cb1c4441873bce62f2ef455a6136888">~Transport</a> (void)</td></tr>
<tr class="memdesc:a0cb1c4441873bce62f2ef455a6136888 inherit pub_methods_classerpc_1_1_transport"><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="classerpc_1_1_transport.html" title="Abstract interface for transport layer. ">Transport</a> destructor. <br /></td></tr>
<tr class="separator:a0cb1c4441873bce62f2ef455a6136888 inherit pub_methods_classerpc_1_1_transport"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a077e72c8afa8caa483220faf45df62c6 inherit pub_methods_classerpc_1_1_transport"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classerpc_1_1_transport.html#a077e72c8afa8caa483220faf45df62c6">setCrc16</a> (<a class="el" href="classerpc_1_1_crc16.html">Crc16</a> *crcImpl)</td></tr>
<tr class="memdesc:a077e72c8afa8caa483220faf45df62c6 inherit pub_methods_classerpc_1_1_transport"><td class="mdescLeft">&#160;</td><td class="mdescRight">This functions sets the CRC-16 implementation.  <a href="#a077e72c8afa8caa483220faf45df62c6">More...</a><br /></td></tr>
<tr class="separator:a077e72c8afa8caa483220faf45df62c6 inherit pub_methods_classerpc_1_1_transport"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:aa2cc9aad8e99fb873ef142426d10a7be"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classerpc_1_1_m_u_transport.html#aa2cc9aad8e99fb873ef142426d10a7be">mu_irq_callback</a> (void)</td></tr>
<tr class="memdesc:aa2cc9aad8e99fb873ef142426d10a7be"><td class="mdescLeft">&#160;</td><td class="mdescRight">Callback function called from MU IRQ.  <a href="#aa2cc9aad8e99fb873ef142426d10a7be">More...</a><br /></td></tr>
<tr class="separator:aa2cc9aad8e99fb873ef142426d10a7be"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr class="memitem:a686380ce4763ecff876bea8d2cc72e44"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classerpc_1_1_m_u_transport.html#a686380ce4763ecff876bea8d2cc72e44">rx_cb</a> (void)</td></tr>
<tr class="memdesc:a686380ce4763ecff876bea8d2cc72e44"><td class="mdescLeft">&#160;</td><td class="mdescRight">Function called from MU IRQ when the MU RX full flag is asserted and the IRQ is enabled.  <a href="#a686380ce4763ecff876bea8d2cc72e44">More...</a><br /></td></tr>
<tr class="separator:a686380ce4763ecff876bea8d2cc72e44"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad7d078fe2c9e6c31c4eefe6d7720a244"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classerpc_1_1_m_u_transport.html#ad7d078fe2c9e6c31c4eefe6d7720a244">tx_cb</a> (void)</td></tr>
<tr class="memdesc:ad7d078fe2c9e6c31c4eefe6d7720a244"><td class="mdescLeft">&#160;</td><td class="mdescRight">Function called from MU IRQ when the MU TX empty flag is asserted and the IRQ is enabled.  <a href="#ad7d078fe2c9e6c31c4eefe6d7720a244">More...</a><br /></td></tr>
<tr class="separator:ad7d078fe2c9e6c31c4eefe6d7720a244"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr class="memitem:ae65cfdb4ea497279cc38b33be217f64a"><td class="memItemLeft" align="right" valign="top">volatile bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classerpc_1_1_m_u_transport.html#ae65cfdb4ea497279cc38b33be217f64a">m_newMessage</a></td></tr>
<tr class="separator:ae65cfdb4ea497279cc38b33be217f64a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9182588c461613f207a84519c7db7c29"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classerpc_1_1_m_u_transport.html#a9182588c461613f207a84519c7db7c29">m_rxMsgSize</a></td></tr>
<tr class="separator:a9182588c461613f207a84519c7db7c29"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abd76d3636483884dd51bf0177daccc7f"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classerpc_1_1_m_u_transport.html#abd76d3636483884dd51bf0177daccc7f">m_rxCntBytes</a></td></tr>
<tr class="separator:abd76d3636483884dd51bf0177daccc7f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a166d8f35868a7312a1ad270e0173c460"><td class="memItemLeft" align="right" valign="top">uint32_t *volatile&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classerpc_1_1_m_u_transport.html#a166d8f35868a7312a1ad270e0173c460">m_rxBuffer</a></td></tr>
<tr class="separator:a166d8f35868a7312a1ad270e0173c460"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2eaee7fe745989f7da8d598c034491a6"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classerpc_1_1_m_u_transport.html#a2eaee7fe745989f7da8d598c034491a6">m_txMsgSize</a></td></tr>
<tr class="separator:a2eaee7fe745989f7da8d598c034491a6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9d22cd6bde64352bf835d6407905fcce"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classerpc_1_1_m_u_transport.html#a9d22cd6bde64352bf835d6407905fcce">m_txCntBytes</a></td></tr>
<tr class="separator:a9d22cd6bde64352bf835d6407905fcce"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab144cee591ebc9ce1ffe3d351a962ad4"><td class="memItemLeft" align="right" valign="top">uint32_t *volatile&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classerpc_1_1_m_u_transport.html#ab144cee591ebc9ce1ffe3d351a962ad4">m_txBuffer</a></td></tr>
<tr class="separator:ab144cee591ebc9ce1ffe3d351a962ad4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3e2698860cf93ece52fc9359143bd2a5"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classerpc_1_1_semaphore.html">Semaphore</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classerpc_1_1_m_u_transport.html#a3e2698860cf93ece52fc9359143bd2a5">m_rxSemaphore</a></td></tr>
<tr class="separator:a3e2698860cf93ece52fc9359143bd2a5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8a0bf39fb5fda8dc9c9b8f9c88b099f9"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classerpc_1_1_semaphore.html">Semaphore</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classerpc_1_1_m_u_transport.html#a8a0bf39fb5fda8dc9c9b8f9c88b099f9">m_txSemaphore</a></td></tr>
<tr class="separator:a8a0bf39fb5fda8dc9c9b8f9c88b099f9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af107ee7b7ee5bdd016fd01077f682efc"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classerpc_1_1_mutex.html">Mutex</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classerpc_1_1_m_u_transport.html#af107ee7b7ee5bdd016fd01077f682efc">m_sendLock</a></td></tr>
<tr class="separator:af107ee7b7ee5bdd016fd01077f682efc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac6d0b82f41b743f76fd85a71a8a5bc9f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classerpc_1_1_mutex.html">Mutex</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classerpc_1_1_m_u_transport.html#ac6d0b82f41b743f76fd85a71a8a5bc9f">m_receiveLock</a></td></tr>
<tr class="separator:ac6d0b82f41b743f76fd85a71a8a5bc9f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa59a102cfc5c31bd638ddbc727d7b903"><td class="memItemLeft" align="right" valign="top">MU_Type *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classerpc_1_1_m_u_transport.html#aa59a102cfc5c31bd638ddbc727d7b903">m_muBase</a></td></tr>
<tr class="separator:aa59a102cfc5c31bd638ddbc727d7b903"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p><a class="el" href="classerpc_1_1_transport.html" title="Abstract interface for transport layer. ">Transport</a> that uses Messaging Unit (MU) for interprocessor messaging. </p>
<p>This transport layer use the Messaging Unit (MU), which enables two processors within the SoC to communicate and coordinate by passing messages (e.g. data, status and control) through the MU interface. The MU has four transmit and four receive registers used for communication between cores, the transport layer use count of registers defined by macro MU_REG_COUNT (default setting is use all MU registers). The communication uses the interrupt from the MU, to be possible use this transport layer on different platform must be specified this macros: MU_IRQ_HANDLER - name of the MU irq handler MU_IRQ - name of MU irq to be possible enable it by passing it as argument to function EnableIRQ() MU_IRQ_PRIORITY - number of priority passed as argument to function NVIC_SetPriority() </p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a27300b08ba409b3d249055f80544ac13"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">MUTransport::MUTransport </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Constructor of MU transport. </p>
<p>This function initializes object attributes. </p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a4b7901579d91960ed7f1857b1d1c3f59"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__infra.html#ga5f8872e58f09a16d192bf664f9898651">erpc_status_t</a> MUTransport::init </td>
          <td>(</td>
          <td class="paramtype">MU_Type *&#160;</td>
          <td class="paramname"><em>muBase</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Initialization of MU transport layer. </p>
<p>Initialize MU peripheral and enable MU interrupt in NVIC.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">Base</td><td>address of MU peripheral</td></tr>
  </table>
  </dd>
</dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">kErpcStatus_Success</td><td>When init function was executed successfully. </td></tr>
    <tr><td class="paramname">kErpcStatus_InitFailed</td><td>When init function wasn't executed successfully. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a781435aad523645be3034460ac8631dc"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__infra.html#ga5f8872e58f09a16d192bf664f9898651">erpc_status_t</a> MUTransport::receive </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classerpc_1_1_message_buffer.html">MessageBuffer</a> *&#160;</td>
          <td class="paramname"><em>message</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Start receiving data and stores it to passed message buffer. </p>
<p>Initialize receiving of message, it is blocking until doesn't receive complete message.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">message</td><td>Message buffer, which will be filled by incoming message.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>kErpcStatus_Success </dd></dl>

<p>Implements <a class="el" href="classerpc_1_1_transport.html#a3f886733620e1a2fe00d12f36711dde5">erpc::Transport</a>.</p>

</div>
</div>
<a class="anchor" id="a1d91622c7c8b8161aaf8dec891ff298a"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__infra.html#ga5f8872e58f09a16d192bf664f9898651">erpc_status_t</a> MUTransport::send </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classerpc_1_1_message_buffer.html">MessageBuffer</a> *&#160;</td>
          <td class="paramname"><em>message</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Function to send prepared message. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">message</td><td>Pass message buffer to send.</td></tr>
  </table>
  </dd>
</dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">kErpcStatus_SendFailed</td><td>Failed to send message buffer. </td></tr>
    <tr><td class="paramname">kErpcStatus_Success</td><td>Successfully sent all data. </td></tr>
  </table>
  </dd>
</dl>

<p>Implements <a class="el" href="classerpc_1_1_transport.html#a4ede71b16625cba746818294148f9aba">erpc::Transport</a>.</p>

</div>
</div>
<a class="anchor" id="aed8229c0d1252932cbc2825240ca718a"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual bool erpc::MUTransport::hasMessage </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Function to check if is new message to receive. </p>
<p>This function should be called before blocking function <a class="el" href="classerpc_1_1_m_u_transport.html#a781435aad523645be3034460ac8631dc" title="Start receiving data and stores it to passed message buffer. ">receive()</a> to avoid waiting for new message.</p>
<dl class="section return"><dt>Returns</dt><dd>True if exist new message, else false. </dd></dl>

<p>Reimplemented from <a class="el" href="classerpc_1_1_transport.html#aea4a3b77e476397c2f665e7c9449839a">erpc::Transport</a>.</p>

</div>
</div>
<a class="anchor" id="aa2cc9aad8e99fb873ef142426d10a7be"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void MUTransport::mu_irq_callback </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Callback function called from MU IRQ. </p>
<p>This function reads status flags of MU and base on the evnet which cause the irq calls function <a class="el" href="classerpc_1_1_m_u_transport.html#a686380ce4763ecff876bea8d2cc72e44" title="Function called from MU IRQ when the MU RX full flag is asserted and the IRQ is enabled. ">rx_cb()</a> to handle rx full irq or <a class="el" href="classerpc_1_1_m_u_transport.html#ad7d078fe2c9e6c31c4eefe6d7720a244" title="Function called from MU IRQ when the MU TX empty flag is asserted and the IRQ is enabled. ">tx_cb()</a> to handle tx empty irq for the particular instance of the <a class="el" href="classerpc_1_1_m_u_transport.html" title="Transport that uses Messaging Unit (MU) for interprocessor messaging. ">MUTransport</a> </p>

</div>
</div>
<a class="anchor" id="a686380ce4763ecff876bea8d2cc72e44"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void MUTransport::rx_cb </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Function called from MU IRQ when the MU RX full flag is asserted and the IRQ is enabled. </p>
<p>When is this function invoked prior receive function (bare metal case) the m_newMessage flag is set and the MU rx full interrupt is disabled. When is this function invoked after receive function the data from MU registers is copied to this receiving buffer passed in receive function. When is received whole message unblock the receive function. </p>

</div>
</div>
<a class="anchor" id="ad7d078fe2c9e6c31c4eefe6d7720a244"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void MUTransport::tx_cb </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Function called from MU IRQ when the MU TX empty flag is asserted and the IRQ is enabled. </p>
<p>Write data from the buffer passed in send function to MU registers. When is sent whole message unblock the send function. </p>

</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a class="anchor" id="ae65cfdb4ea497279cc38b33be217f64a"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">volatile bool erpc::MUTransport::m_newMessage</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Flag used in function <a class="el" href="classerpc_1_1_m_u_transport.html#aed8229c0d1252932cbc2825240ca718a" title="Function to check if is new message to receive. ">hasMessage()</a> to inform server by polling function that message is ready for receiving </p>

</div>
</div>
<a class="anchor" id="a9182588c461613f207a84519c7db7c29"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t erpc::MUTransport::m_rxMsgSize</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Size of received message - count of bytes to must be received to complete currently received message </p>

</div>
</div>
<a class="anchor" id="abd76d3636483884dd51bf0177daccc7f"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t erpc::MUTransport::m_rxCntBytes</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Count of currently received bytes of message </p>

</div>
</div>
<a class="anchor" id="a166d8f35868a7312a1ad270e0173c460"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t* volatile erpc::MUTransport::m_rxBuffer</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Pointer to buffer to which is copied data from MU registers during receiving </p>

</div>
</div>
<a class="anchor" id="a2eaee7fe745989f7da8d598c034491a6"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t erpc::MUTransport::m_txMsgSize</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Size of transmitted message - count of bytes to must be transmitted to send complete message </p>

</div>
</div>
<a class="anchor" id="a9d22cd6bde64352bf835d6407905fcce"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t erpc::MUTransport::m_txCntBytes</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Count of currently received bytes of message </p>

</div>
</div>
<a class="anchor" id="ab144cee591ebc9ce1ffe3d351a962ad4"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t* volatile erpc::MUTransport::m_txBuffer</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Pointer to buffer from which is copied data to MU registers during sending </p>

</div>
</div>
<a class="anchor" id="a3e2698860cf93ece52fc9359143bd2a5"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classerpc_1_1_semaphore.html">Semaphore</a> erpc::MUTransport::m_rxSemaphore</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p><a class="el" href="classerpc_1_1_semaphore.html" title="Simple semaphore class. ">Semaphore</a> used by RTOS to block task until the receiving is not complete </p>

</div>
</div>
<a class="anchor" id="a8a0bf39fb5fda8dc9c9b8f9c88b099f9"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classerpc_1_1_semaphore.html">Semaphore</a> erpc::MUTransport::m_txSemaphore</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p><a class="el" href="classerpc_1_1_semaphore.html" title="Simple semaphore class. ">Semaphore</a> used by RTOS to block task until the sending is not complete </p>

</div>
</div>
<a class="anchor" id="af107ee7b7ee5bdd016fd01077f682efc"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classerpc_1_1_mutex.html">Mutex</a> erpc::MUTransport::m_sendLock</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p><a class="el" href="classerpc_1_1_mutex.html" title="Mutex. ">Mutex</a> protecting send. </p>

</div>
</div>
<a class="anchor" id="ac6d0b82f41b743f76fd85a71a8a5bc9f"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classerpc_1_1_mutex.html">Mutex</a> erpc::MUTransport::m_receiveLock</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p><a class="el" href="classerpc_1_1_mutex.html" title="Mutex. ">Mutex</a> protecting receive. </p>

</div>
</div>
<a class="anchor" id="aa59a102cfc5c31bd638ddbc727d7b903"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">MU_Type* erpc::MUTransport::m_muBase</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Base address of MU peripheral </p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="erpc__mu__transport_8h_source.html">erpc_mu_transport.h</a></li>
<li>erpc_mu_transport.cpp</li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- HTML footer for doxygen 1.8.5-->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul class="foot">
    <li class="footer">Copyright 2016-2020 NXP Semiconductors. All rights reserved.
    </li>
  </ul>
</div>
</body>
</html>
